let arr = [1,3,3,4,1,3,5];

function delArrayReapet(arr) {
    let newArr = [...arr];
    for(let i = 0;i < newArr.length;) {
        let index = newArr.indexOf(newArr[i],i+1);
        if(index !== -1) {
            newArr.splice(index,1);
        }else {
            i++;
        }
        
    }

    return newArr;
}

console.log(arr,delArrayReapet(arr));

